翻訳と辞書
Words near each other
・ OPH
・ Oph 162225-240515
・ Oph-IRS 48
・ Opha May Johnson
・ Ophaboom Theatre Company
・ Ophanim
・ Ophanin
・ Opharus
・ Opharus aeschista
・ Operative temperature
・ Operativo Independencia
・ Operator
・ Operator (A Girl Like Me)
・ Operator (band)
・ Operator (biology)
Operator (computer programming)
・ Operator (extension)
・ Operator (Floy Joy song)
・ Operator (linguistics)
・ Operator (mathematics)
・ Operator (Midnight Star song)
・ Operator (Motown song)
・ Operator (physics)
・ Operator (play)
・ Operator (profession)
・ Operator (sternwheeler)
・ Operator (That's Not the Way It Feels)
・ Operator 13
・ Operator algebra
・ Operator assistance


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Operator (computer programming) : ウィキペディア英語版
Operator (computer programming)

Programming languages typically support a set of operators: constructs which behave generally like functions, but which differ syntactically or semantically from usual functions. Common simple examples include arithmetic (addition with +, comparison with >) and logical operations (such as AND or &&). More involved examples include assignment (usually = or :=), field access in a record or object (usually .), and the scope resolution operator (often ::). Languages usually define a set of built-in operators, and in some cases allow user-defined operators.
==Syntax==
Syntactically operators usually contrast to functions. In most languages, functions may be seen as a special form of prefix operator with fixed precedence level and associativity, often with compulsory parentheses e.g. Func(a) (or (Func a) in LISP). Most languages support programmer-defined functions, but cannot really claim to support programmer-defined operators, unless they have more than prefix notation and more than a single precedence level. Semantically operators can be seen as special form of function with different calling notation and a limited number of parameters (usually 1 or 2).
The position of the operator with respect to its operands may be prefix, infix or postfix, and the syntax of an expression involving an operator depends on its arity (number of operands), precedence, and (if applicable), associativity. Most programming languages support binary operators and a few unary operators, with a few supporting more operands, such as the ?: operator in C, which is ternary. Commonly, unary operations are prefix, such as unary minus -x, or occasionally postfix, such as post-increment x++; and binary operations are infix, such as x + y or x = y. Infix operations of higher arity require additional symbols, such as the ternary operator ?: in C, written as a ? b : c – indeed, this is the only common example, it is often referred to as ''the'' ternary operator. Prefix and postfix operations can easily support any desired arity, however, such as 1 2 3 4 +.
Occasionally〔(Mathematica reference )〕〔(Maxima reference )〕 parts of a language may be described as "matchfix" or "circumfix"〔()〕〔()〕 operators, either to simplify the language's description or implementation. A circumfix operator consists of two or more parts which enclose its operands. Circumfix operators have the highest precedence, with their contents being evaluated and the resulting value used in the surrounding expression. The most familiar circumfix operator are the parentheses mentioned above, used to indicate which parts of an expression are to be evaluated before others. Another example from physics is the inner product notation of Dirac's bra–ket notation. Circumfix operators are especially useful to denote operations that involve many or varying numbers of operands.
The specification of a language will specify the syntax the operators it supports, while languages such as Prolog that support programmer-defined operators require that the syntax be defined by the programmer.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Operator (computer programming)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.